package com.slz3.business.module.configManagement.conSiteCity.steward;

import com.slz3.business.module.configManagement.conSiteCity.domain.ConSiteCity;
import com.slz3.business.module.configManagement.conSiteCity.domain.ConSiteCityCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConSiteCityResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(ConSiteCity.class).flatMap(conSiteCity ->
                ConSiteCityResController.add(req, conSiteCity)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(ConSiteCityCondition.class).flatMap(conSiteCityCondition ->
                ConSiteCityResController.delete(req, conSiteCityCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(ConSiteCity.class).flatMap(conSiteCity ->
                ConSiteCityResController.modify(req, conSiteCity)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return ConSiteCityResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return ConSiteCityResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return ConSiteCityResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(ConSiteCityCondition.class).flatMap(conSiteCityCondition ->
                ConSiteCityResController.auditSubmit(req, conSiteCityCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(ConSiteCityCondition.class).flatMap(conSiteCityCondition ->
                ConSiteCityResController.audit(req, conSiteCityCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(ConSiteCityCondition.class).flatMap(conSiteCityCondition ->
                ConSiteCityResController.auditReject(req, conSiteCityCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(ConSiteCityCondition.class).flatMap(conSiteCityCondition ->
                ConSiteCityResController.usingEnable(req, conSiteCityCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(ConSiteCityCondition.class).flatMap(conSiteCityCondition ->
                ConSiteCityResController.usingDisable(req, conSiteCityCondition)
        );
    }   

}
